package com.study.mapper;

import com.study.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 登录用户
 */
@Component
public interface SysUserMapper extends Mapper<SysUser> {
    /**
     * 登录
     * @return
     */
    String login(@Param("userName")String userName, @Param("passWord")String passWord);

    /**
     * 根据id查找用户
     * @param chrId
     * @return
     */
    SysUser findUserById(@Param("chrId")String chrId);

    /**
     * @description 
     * @author hw
     * @date 2021/9/22 20:10:59
     * @param sysUser:  
     * @return com.study.entity.SysUser 
     */
    SysUser findUser(@Param("sysUser") SysUser sysUser);

    /**
     * 修改用户
     * @param sysUser
     * @return
     */
    int updateSysUser(@Param("sysUser") SysUser sysUser);


    /**
     *
     * @author hw
     * @date 2022/2/21 15:37:25
     * @param idList:
     * @return com.study.entity.SysUser
     */
    List<SysUser> findUserByIdList(@Param("idList") List<String> idList);

    List<String> findErrorIdCardNo();

    void updateErrorIdCardNo(@Param("result")boolean result, @Param("idCardNo") String idCardNo);

}
